package Timer;

public class demo1 {
    public static void main(String[] args) {
        MyTimer myTimer = new MyTimer();
        myTimer.schedule(()->{
            System.out.println(Thread.currentThread().getName() + "--> 1s 之后输出");
        },1000);

        myTimer.schedule(()->{
            System.out.println(Thread.currentThread().getName() + "--> 20s 之后输出");
        },20000);

        myTimer.schedule(()->{
            System.out.println(Thread.currentThread().getName() + "--> 3s 之后输出");
        },3000);
    }
}
